3.12 \(\int \frac {\csc (x)}{a \cos (x)+b \sin (x)} \, dx\)

Optimal. Leaf size=23 \[ \frac {\log (\sin (x))}{a}-\frac {\log (a \cos (x)+b \sin (x))}{a} \]

[Out]

ln(sin(x))/a-ln(a*cos(x)+b*sin(x))/a

________________________________________________________________________________________

Rubi [A]  time = 0.07, antiderivative size = 23, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {3101, 3475, 3133} \[ \frac {\log (\sin (x))}{a}-\frac {\log (a \cos (x)+b \sin (x))}{a} \]

Antiderivative was successfully verified.

[In]

Int[Csc[x]/(a*Cos[x] + b*Sin[x]),x]

[Out]

Log[Sin[x]]/a - Log[a*Cos[x] + b*Sin[x]]/a

Rule 3101

Int[1/(sin[(c_.) + (d_.)*(x_)]*(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_.) + (d_.)*(x_)])), x_Symbol] :>
Dist[1/a, Int[Cot[c + d*x], x], x] - Dist[1/a, Int[(b*Cos[c + d*x] - a*Sin[c + d*x])/(a*Cos[c + d*x] + b*Sin[c
 + d*x]), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 + b^2, 0]

Rule 3133

Int[((A_.) + cos[(d_.) + (e_.)*(x_)]*(B_.) + (C_.)*sin[(d_.) + (e_.)*(x_)])/((a_.) + cos[(d_.) + (e_.)*(x_)]*(
b_.) + (c_.)*sin[(d_.) + (e_.)*(x_)]), x_Symbol] :> Simp[((b*B + c*C)*x)/(b^2 + c^2), x] + Simp[((c*B - b*C)*L
og[a + b*Cos[d + e*x] + c*Sin[d + e*x]])/(e*(b^2 + c^2)), x] /; FreeQ[{a, b, c, d, e, A, B, C}, x] && NeQ[b^2
+ c^2, 0] && EqQ[A*(b^2 + c^2) - a*(b*B + c*C), 0]

Rule 3475

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin {align*} \int \frac {\csc (x)}{a \cos (x)+b \sin (x)} \, dx &=\frac {\int \cot (x) \, dx}{a}-\frac {\int \frac {b \cos (x)-a \sin (x)}{a \cos (x)+b \sin (x)} \, dx}{a}\\ &=\frac {\log (\sin (x))}{a}-\frac {\log (a \cos (x)+b \sin (x))}{a}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.05, size = 20, normalized size = 0.87 \[ \frac {\log (\sin (x))-\log (a \cos (x)+b \sin (x))}{a} \]

Antiderivative was successfully verified.

[In]

Integrate[Csc[x]/(a*Cos[x] + b*Sin[x]),x]

[Out]

(Log[Sin[x]] - Log[a*Cos[x] + b*Sin[x]])/a

________________________________________________________________________________________

fricas [A]  time = 0.45, size = 44, normalized size = 1.91 \[ -\frac {\log \left (2 \, a b \cos \relax (x) \sin \relax (x) + {\left (a^{2} - b^{2}\right )} \cos \relax (x)^{2} + b^{2}\right ) - \log \left (-\frac {1}{4} \, \cos \relax (x)^{2} + \frac {1}{4}\right )}{2 \, a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)/(a*cos(x)+b*sin(x)),x, algorithm="fricas")

[Out]

-1/2*(log(2*a*b*cos(x)*sin(x) + (a^2 - b^2)*cos(x)^2 + b^2) - log(-1/4*cos(x)^2 + 1/4))/a

________________________________________________________________________________________

giac [A]  time = 1.72, size = 22, normalized size = 0.96 \[ -\frac {\log \left ({\left | b \tan \relax (x) + a \right |}\right )}{a} + \frac {\log \left ({\left | \tan \relax (x) \right |}\right )}{a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)/(a*cos(x)+b*sin(x)),x, algorithm="giac")

[Out]

-log(abs(b*tan(x) + a))/a + log(abs(tan(x)))/a

________________________________________________________________________________________

maple [A]  time = 0.71, size = 21, normalized size = 0.91 \[ -\frac {\ln \left (a +b \tan \relax (x )\right )}{a}+\frac {\ln \left (\tan \relax (x )\right )}{a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(x)/(a*cos(x)+b*sin(x)),x)

[Out]

-1/a*ln(a+b*tan(x))+1/a*ln(tan(x))

________________________________________________________________________________________

maxima [B]  time = 0.32, size = 48, normalized size = 2.09 \[ -\frac {\log \left (-a - \frac {2 \, b \sin \relax (x)}{\cos \relax (x) + 1} + \frac {a \sin \relax (x)^{2}}{{\left (\cos \relax (x) + 1\right )}^{2}}\right )}{a} + \frac {\log \left (\frac {\sin \relax (x)}{\cos \relax (x) + 1}\right )}{a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)/(a*cos(x)+b*sin(x)),x, algorithm="maxima")

[Out]

-log(-a - 2*b*sin(x)/(cos(x) + 1) + a*sin(x)^2/(cos(x) + 1)^2)/a + log(sin(x)/(cos(x) + 1))/a

________________________________________________________________________________________

mupad [B]  time = 0.58, size = 32, normalized size = 1.39 \[ -\frac {\ln \left (-a\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2+2\,b\,\mathrm {tan}\left (\frac {x}{2}\right )+a\right )-\ln \left (\mathrm {tan}\left (\frac {x}{2}\right )\right )}{a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(sin(x)*(a*cos(x) + b*sin(x))),x)

[Out]

-(log(a + 2*b*tan(x/2) - a*tan(x/2)^2) - log(tan(x/2)))/a

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\csc {\relax (x )}}{a \cos {\relax (x )} + b \sin {\relax (x )}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)/(a*cos(x)+b*sin(x)),x)

[Out]

Integral(csc(x)/(a*cos(x) + b*sin(x)), x)

________________________________________________________________________________________